<taglib name="Common\TagLib\Sohtml"/>
<div class="panel">    
    <form action="{:U('Address/address_edit_save')}" method="post">
        <table class="table-form">
            <tr><th>联系人：</th><td><input type="text" name="consignee" value="{$data.consignee}" placeholder="联系人" /></td></tr>
            <tr><th>联系电话：</th><td><input type="text" name="telphone" value="{$data.telphone}" placeholder="联系电话" /></td></tr>
            <tr><th>地区：</th><td><sohtml:region province="{$data.province}" city="{$data.city}" area="{$data.area}" names="province,city,area" /></td></tr>
            <tr><th>街道：</th><td><input type="text" name="street" size="41" placeholder="街道" value="{$data.street}"/></td></tr>
            <tr><th>邮政编码：</th><td><input type="text" name="zipCode" placeholder="邮政编码" value="{$data.zipCode}"/></td></tr>
            <tr><th>是否默认：</th><td><input type="checkbox" name="isDefault" value="1" data-value="{$data.isDefault}" /></td></tr>
            <tr><th>排列次序：</th><td><input type="text" name="ordinal" value="{$data.ordinal|default=999}" /></td></tr>
        </table><br />
        <button type="submit">保存</button><input type="reset" value="重置"/>
        <input type='hidden' name='id' value='{$data.id}'/>
        <input type='hidden' name='uid' value='{$uid}'/>
    </form>
</div>
<script type="text/javascript">
    if ($('input[name="isDefault"]').data('value') == '1') {
        $('input[name="isDefault"]').prop('checked', 'checked');
    }
</script>